import { createContext, useContext } from 'react';

const StoreContext = createContext();

const Provider = ({ store, children }) => {
  return (
    <StoreContext.Provider value={store}>
      {children}
    </StoreContext.Provider>
  );
};

const useStoreContext = () => {
  return useContext(StoreContext);
};

export { StoreContext as default, Provider, useStoreContext };